import request from '@/sheep/request';

export default {
    //招聘列表
    getRecruitmentList: (params) =>
    request({
        url: 'api/recruitment',
        method: 'GET',
        params,
        custom: {
            showSuccess: false,
            successMsg: '',
            showError: false,
            errorMsg: '',
            showLoading: false,
            loadingMsg: '加载中',
            auth: true,
        },
    }),
    // 招聘详情
    getListDetail: (params) =>
		request({
			url: 'api/recruitment/view',
			method: 'GET',
			params,
			custom: {
				showSuccess: false,
                successMsg: '',
                showError: true,
                errorMsg: '',
                showLoading: true,
                loadingMsg: '加载中',
                auth: true,
			},
		}),
    // 招聘添加
    postRecruitmentAdd: (data) =>
    request({
        url: 'api/recruitment/add',
        method: 'POST',
        data,
        custom: {
            showSuccess: false,
            successMsg: '',
            showError: false,
            errorMsg: '',
            showLoading: false,
            loadingMsg: '加载中',
            auth: true,
        },
    }),
    //招聘修改
    postRecruitmentEdit: (data) =>
    request({
        url: 'api/recruitment/edit',
        method: 'POST',
        data,
        custom: {
            showSuccess: true,
            successMsg: '',
            showError: true,
            errorMsg: '',
            showLoading: false,
            loadingMsg: '加载中',
            auth: true,
        },
    }),
//    招聘审核
    getRecruitmentApproveList: (params) =>
		request({
			url: 'api/recruitment/approve_list',
			method: 'GET',
			params,
			custom: {
				showLoading: true,
				loadingMsg: '加载中',
				showError: true,
				showSuccess: false,
				errorMsg: '',
				auth: true,
				successMsg: false,
			},
		}),
    // 岗位   
    getStationtList: (params) =>
    request({
        url: 'api/post',
        method: 'GET',
        params,
        custom: {
            showSuccess: false,
            successMsg: '',
            showError: true,
            errorMsg: '',
            showLoading: false,
            loadingMsg: '加载中',
            auth: true,
        },
    }),
    //福利待遇
    getBenefitsList: (params) =>
		request({
			url: 'api/social_benefits',
			method: 'GET',
			params,
			custom: {
                showSuccess: false,
                successMsg: '',
                showError: true,
                errorMsg: '',
                showLoading: false,
                loadingMsg: '加载中',
                auth: true,
			},
		}),
    //公司名称
    getCompanytList: (params) =>
    request({
        url: 'api/company',
        method: 'GET',
        params,
        custom: {
            showSuccess: false,
            successMsg: '',
            showError: true,
            errorMsg: '',
            showLoading: false,
            loadingMsg: '加载中',
            auth: true,
        },
    }),
        //招聘审核通过
        getRecruitmentPass: (params) =>
        request({
            url: 'api/recruitment/pass',
            method: 'GET',
            params,
            custom: {
				showSuccess: false,
				successMsg: '',
				showError: true,
				errorMsg: '',
                showLoading: true,
				loadingMsg: '加载中',
				auth: true,
            },
        }),
      //招聘审核拒绝
      getRecruitmentRefuse: (params) =>
      request({
          url: 'api/recruitment/refuse',
          method: 'GET',
          params,
          custom: {
            showSuccess: false,
            successMsg: '',
            showError: true,
            errorMsg: '',
            showLoading: true,
            loadingMsg: '加载中',
            auth: true,
          },
      }),
}